import request from '@/utils/request.js'


// 登录接口
export const login = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/login',
    data
  })
}

// 修改密码
export const updatePwd = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/updatePwd',
    data
  })
}

// 首页接口接口
export const indexdata = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/indexdata',
    data
  })
}

// 余额变更记录
export const voucherRecord = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherRecord',
    data
  })
}

// 代金券发放记录
export const voucherUserRecord = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherUserRecord',
    data
  })
}

// 助理列表
export const getStaff = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/getStaff',
    data
  })
}
// 新增助理
export const addStaff = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/addStaff',
    data
  })
}

// 助理管理
export const manageStaff = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/manageStaff',
    data
  })
}
// 扫码接口
export const scan = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/scan',
    data
  })
}

// 扫码
export const scandata = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/scandata',
    data
  })
}

// 赠券1
export const addVoucher = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/addVoucher',
    data
  })
}

// 减券
export const deductVoucher = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/deductVoucher',
    data
  })
}


// 赠券2
export const quotaRecharge = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/quotaRecharge',
    data
  })
}



// 超管管理商户
export const manage = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/manage',
    data
  })
}

// 超管重置密码
export const resetPwd = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/resetPwd',
    data
  })
}

// 超管管理商户 ban
export const ban = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/ban',
    data
  })
}

// 超管管理商户 allow
export const allow = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/allow',
    data
  })
}

// 店长获取二维码内容（点预览用）
export const getqrcode = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/getqrcode',
    data
  })
}

// 店长修改二维码内容（点确认金额用）
export const setqrcode = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/setqrcode',
    data
  })
}

// 店长或助理审核领券列表
export const voucherApplyLIst = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherApplyLIst',
    data
  })
}

// 店长或助理审核领券
export const voucherApplyConfirm = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherApplyConfirm',
    data
  })
}

// 获取邀请新用户链接
export const getUrlLink = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/getUrlLink',
    data
  })
}